package com.panopset.io;

import java.io.File;

/**
 * IO Util.
 *
 * @author Karl Dinwiddie
 *
 */
public final class Util {

    /**
     * Global replace text in a directory.
     *
     * @param path
     *            Top level directory. Subdirectories will also be traversed.
     * @param from
     *            Replace String.
     * @param to
     *            Replacement String.
     * @param extension
     *            File extension, ie: &quot;.java&quot;.
     */
    public static void directoryReplace(final String path, final String from,
            final String to, final String extension) {
        new GlobalReplace(new File(path), from, to, extension).exec();
    }

    /**
     * Prevent instantiation.
     */
    private Util() { }
}
